<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>伪元素选择器</title>
  <style>
    html {
      font-size: 100px;
    }

    .username::before {
      content: '😀';
      width: 150px;
      height: 150px;
      background-color: #ff0;
      display: block;
    }

    .password::after {
      content: '🔑';
      width: 150px;
      height: 150px;
      background-color: #ff0;
      display: inline-block;
    }
  </style>
</head>

<body>
  <span class="username">用户</span>
  <span class="password">密码</span>
</body>

</html>